FuturePrintProbability
METADATA
Attribute | Value |
---|---|
Topic | 4255-probabilities |
MLink Token | FutProbModel |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
fkey_at | enum - AssetType | PRI | 'None' | |
fkey_ts | enum - TickerSrc | PRI | 'None' | |
fkey_tk | VARCHAR(12) | PRI | '' | |
fkey_yr | SMALLINT UNSIGNED | PRI | 0 | |
fkey_mn | TINYINT UNSIGNED | PRI | 0 | |
fkey_dy | TINYINT UNSIGNED | PRI | 0 | |
stateModel | enum - StateModel | PRI | 'None' | |
prtPrice | DOUBLE | 0 | ||
prtSize | INT | 0 | ||
prtProb | FLOAT | 0 | probability that this print will result in positive PnL | |
prtSide | enum - BuySell | 'None' | ||
bidPrice | DOUBLE | 0 | nbbo bid price | |
askPrice | DOUBLE | 0 | nbbo ask price | |
bidSize | INT | 0 | cumulative size bid price | |
askSize | INT | 0 | cumulative size ask price | |
avgBLink1m | FLOAT | 0 | average buy link value trailing 10 | |
maeBLink1m | FLOAT | 0 | buy link value mean abs err trailing 1000 | |
avgSLink1m | FLOAT | 0 | average sell link value trailing 10 | |
maeSLink1m | FLOAT | 0 | sell link value mean abs err trailing 1000 | |
avgBLink10m | FLOAT | 0 | average buy link value trailing 100 | |
maeBLink10m | FLOAT | 0 | bid link value mean abs err trailing 1000 | |
avgSLink10m | FLOAT | 0 | average ask link value trailing 100 | |
maeSLink10m | FLOAT | 0 | ask link value mean abs err trailing 1000 | |
bCounter | INT | 0 | buy counter | |
sCounter | INT | 0 | sell counter | |
prtTimestamp | BIGINT | 0 | feed timestamp from the packet | |
netTimestamp | BIGINT | 0 | inbound packet PTP timestamp from SR gateway switch from FuturePrint | |
smsTimestamp | BIGINT | 0 | state model server timestamp just before publish |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
fkey_tk | 1 |
fkey_yr | 2 |
fkey_mn | 3 |
fkey_dy | 4 |
fkey_at | 5 |
fkey_ts | 6 |
stateModel | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgFuturePrintProbability` (
`fkey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`fkey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`fkey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`fkey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`stateModel` ENUM('None','M1','M2','M3','M4') NOT NULL DEFAULT 'None',
`prtPrice` DOUBLE NOT NULL DEFAULT 0,
`prtSize` INT NOT NULL DEFAULT 0,
`prtProb` FLOAT NOT NULL DEFAULT 0 COMMENT 'probability that this print will result in positive PnL',
`prtSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`bidPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'nbbo bid price',
`askPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'nbbo ask price',
`bidSize` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size @ bid price',
`askSize` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size @ ask price',
`avgBLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average buy link value (trailing 10)',
`maeBLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'buy link value mean abs err (trailing 1000)',
`avgSLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average sell link value (trailing 10)',
`maeSLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'sell link value mean abs err (trailing 1000)',
`avgBLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average buy link value (trailing 100)',
`maeBLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid link value mean abs err (trailing 1000)',
`avgSLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average ask link value (trailing 100)',
`maeSLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask link value mean abs err (trailing 1000)',
`bCounter` INT NOT NULL DEFAULT 0 COMMENT 'buy counter',
`sCounter` INT NOT NULL DEFAULT 0 COMMENT 'sell counter',
`prtTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'feed timestamp from the packet',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch (from FuturePrint)',
`smsTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'state model server timestamp (just before publish)',
PRIMARY KEY USING HASH (`fkey_tk`,`fkey_yr`,`fkey_mn`,`fkey_dy`,`fkey_at`,`fkey_ts`,`stateModel`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`fkey_at`,
`fkey_ts`,
`fkey_tk`,
`fkey_yr`,
`fkey_mn`,
`fkey_dy`,
`stateModel`,
`prtPrice`,
`prtSize`,
`prtProb`,
`prtSide`,
`bidPrice`,
`askPrice`,
`bidSize`,
`askSize`,
`avgBLink1m`,
`maeBLink1m`,
`avgSLink1m`,
`maeSLink1m`,
`avgBLink10m`,
`maeBLink10m`,
`avgSLink10m`,
`maeSLink10m`,
`bCounter`,
`sCounter`,
`prtTimestamp`,
`netTimestamp`,
`smsTimestamp`
FROM `SRAnalytics`.`MsgFuturePrintProbability`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`fkey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`fkey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`fkey_tk` = 'Example_fkey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`fkey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_dy` = 1
AND
/* Replace with a ENUM('None','M1','M2','M3','M4') */
`stateModel` = 'None';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='FuturePrintProbability' ORDER BY ordinal_position ASC;